package com.windea.study.springcloud.ribbon.service;

import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

@Service
public class HelloService {
	private final RestTemplate restTemplate;

	public HelloService(RestTemplate restTemplate) {
		this.restTemplate = restTemplate;
	}

	public String hello(String name) {
		return restTemplate.getForObject("http://eureka-client/hello?name=Windea", String.class);
	}
}
